<template>
  <div class="base-header">
    <div class="org-name">{{ homePage }}-{{ orgText }}</div>
    <slot></slot>
    <span class="control-fullscreen" @click="switchFullScreen"></span>
  </div>
</template>

<script>
export default {
  data() {
    return {
      isFullScreen: false,
      procurementPackageName: "",
      orgText: "",
      pageName: "",
      homePage: "",
    };
  },
  watch: {},
  created() {},
  mounted() {},
  methods: {
    switchFullScreen() {
      switchFullScreen(this.isFullScreen);
      this.isFullScreen = !this.isFullScreen;
    },
  },
};

/**
 * 全屏显示切换
 */
function switchFullScreen(isFullScreen) {
  if (isFullScreen) {
    // $("html").scrollTop("0")
    $(".mains").removeClass("full-screen");
    $("#home", parent.document).removeClass("full-screen");
    $(".top-nav", parent.document).removeClass("full-screen");
    $(".organization-menu", parent.document).removeClass("full-screen");
  } else {
    // $("html").scrollTop("50")
    $(".mains").addClass("full-screen");
    $("#home", parent.document).addClass("full-screen");
    $(".top-nav", parent.document).addClass("full-screen");
    $(".organization-menu", parent.document).addClass("full-screen");
  }
}
</script>
<style lang="scss" scoped>
.base-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 2% 0 53rem;
  .org-name {
    line-height: 49rem;
    font-size: 15rem;
  }
  .control-fullscreen {
    cursor: pointer;
    margin-left: 14rem;
    display: inline-block;
    width: 20.94rem;
    height: 20.94rem;
    background: url(../../assets/images/icon_fullscreen@2x.png) no-repeat;
    background-size: 100% 100%;
  }
}
</style>
